<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        .box {
            box-sizing: border-box;
            display: inline-block;
            width: 50%;
            border: 1px solid red;
            padding: 5px;
        }
    </style>
</head>
<body>
    <div class="container flex">
        <div class="box">第1个盒子</div><div class="box">第2个盒子</div>
    </div>
</body>
</html>